﻿
/*----------------------------------------------------------------
    Copyright (C) 2017 CXC

    文件名：IACClient.cs
    文件功能描述：客户端调用接口


    创建标识：CXC @ 20170612

----------------------------------------------------------------*/


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AcSDK.Core
{
    /// <summary>
    /// AC调用接口.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IAcClient
    {
        /// <summary>
        /// 执行AC公开API请求。
        /// </summary>
        /// <typeparam name="T">领域对象</typeparam>
        /// <param name="request">具体的AC API请求</param>
        /// <returns>领域对象</returns>
        T Call<T>(IAcRequest<T> request) where T : AcResponseBase;

        /// <summary>
        /// 执行AC隐私API请求。
        /// </summary>
        /// <typeparam name="T">领域对象</typeparam>
        /// <param name="request">具体的AC API请求</param>
        /// <param name="timestamp">请求时间戳</param>
        /// <returns>领域对象</returns>
        T Call<T>(IAcRequest<T> request, DateTime timestamp) where T : AcResponseBase;
    }
}
